-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: expand steps, make prod-ready workflow, fix edge cases #14
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZLLentz
changed the title
BUG: make this work better from fresh install by expanding bootstrapping
ENH: expand steps, make prod-ready workflow, fix edge cases
Mar 8, 2024
I'm intending to review this in a small group in a dedicated meeting, along with the accompanying how-to procedure. Note to self: don't forget to also review the dotfiles PR. |
…suitable for per-user use.
nrwslac
approved these changes
Mar 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attended TC Ansible review. lgtm!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started this PR to fix the issue that was stopping us from setting up the TMO vacuum PLC, but then I kept it open as I added more fixes/workflow improvements. It has gotten fairly big.
List of changes, with accompanying justifications:
ansible_host
variable instead of ip addresses for better compatibility (helped with the tmo PLC, didn't disrupt the test PLCs)add_to_inventory.py
script for adding plc hostnames to the inventory yaml, to avoid human error in this process.first_time_setup.sh
tobootstrap_plc.sh
for naming consistency withprovision_plc.sh
bootstrap_plc.sh
to scp pre-downloaded python libraries to the PLC to avoid manual work or redoing work in multiple ansible playbooks. This lets us defer setting up pkg configuration until we have Python available to run the full suite of ansible command.bootstrap_plc.sh
to prompt us to change the default password to the secret admin password. Including this in the main workflow increases the chance it actually gets done, protecting our PLCs from accidental changes.dry_run.sh
which does a dry-run of the provisioning playbook, so we can see what a change would have done without forcing it to happen.make_vars.py
which builds an initial version of a host-specificvars.yaml
file from a minimal template and appends the commented out options automatically.ansible-playbook
via the scripts, just in case we want to use any of the various playbook options.setup_new_plc.sh
as a one-stop-shop for setting up a new PLC, to make it very clear and easy for someone who just wants to "get their PLC ready".ssh_agent_helper.sh
as a helpful utility script for ensuring ssh-agent is running and adding the tcbsd ssh key to it. This will prevent people from needing to type in the admin password dozens of times during setup.update_admin_pass.sh
as a small utility for changing the admin password on a bunch of PLCs at once. I will need to run this any time we decide to update the admin password (hopefully only once).